home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Amos / AMOSList-1097 / AMOSLIST / text0233.txt < prev    next >
Encoding:
Text File  |  1998-06-24  |  1.1 KB  |  26 lines

  1. On 25-Oct-97, Alastair Murray wrote:
  2. >Anyone have any AMOS code for doing a pattern match on a string?
  3. >e.g. *.AMOS or #?.AMOS to see if a string contains .AMOS in it
  4. >anywhere.
  5. >Saves me writing it myself...
  6.  
  7. A=Instr(<string to check>,<string to search for>)
  8.  
  9. If it was there, A will contain the start position of the first occurance.
  10. Otherwise, A will be 0.
  11.  
  12. Well met and godspeed,
  13.                       Giark
  14.                                            joehick@golden.net
  15.                              http://www.golden.net/~joehick/fbn/index.html
  16.      ______  ______    _____  .------------------------------------------.
  17.     / ____/ / __  /   / ___ \ !     AMOS games, utilities, demos, etc.   !
  18.    / /__   / /_/ /   / /  / / !                                          !
  19.   / ___/  / ___  |  / /  / /  !       CyberSpace BBS (519)579-0072       !
  20.  / /     / /__/ /  / /  / /   !     on A2000 060/50MHz (519)579-0173     !
  21. /_/     /______/  /_/  /_/    !                                          !
  22.    Fly By Nite Videe-Oh!      !  FBN Amiga 500 020 14MHz 1C/5F RAM 3.1OS !
  23.          IAPA Member          `------------------------------------------'
  24.  
  25.  
  26.